home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / gnu / termcap.lha / termcap-1.2 / Makefile.in < prev    next >
Makefile  |  1993-04-12  |  3KB  |  119 lines

  1. # Makefile for GNU termcap library.
  2. # Copyright (C) 1992, 1993 Free Software Foundation, Inc.
  3.  
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2, or (at your option)
  7. # any later version.
  8.  
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. # GNU General Public License for more details.
  13.  
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program; if not, write to the Free Software
  16. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18. #### Start of system configuration section. ####
  19.  
  20. srcdir = @srcdir@
  21. VPATH = @srcdir@
  22.  
  23. CC = @CC@
  24.  
  25. # If you don't have a BSD or GNU install program, use cp.
  26. INSTALL = @INSTALL@
  27. INSTALL_DATA = @INSTALL_DATA@
  28.  
  29. MAKEINFO = makeinfo
  30.  
  31. # Things you might add to DEFS:
  32. # -DHAVE_STRING_H    If you have memcpy instead of bcopy.
  33. # -DNO_ARG_ARRAY    If you can't take the address of the first of
  34. #            a group of arguments and treat it as an array.
  35. #            We always define this, because it's not a big loss
  36. #            and can't be detected when cross-autoconfiguring.
  37.  
  38. DEFS = @DEFS@ -DNO_ARG_ARRAY
  39.  
  40. CFLAGS = -g
  41.  
  42. prefix = /usr/local
  43. exec_prefix = $(prefix)
  44.  
  45. # Directory in which to install libtermcap.a.
  46. libdir = $(exec_prefix)/lib
  47.  
  48. # Directory in which to install termcap.h.
  49. includedir = $(prefix)/include
  50.  
  51. # Directory in which to optionally also install termcap.h,
  52. # so compilers besides gcc can find it by default.
  53. # If it is empty or not defined, termcap.h will only be installed in
  54. # includedir. 
  55. oldincludedir = /usr/include
  56.  
  57. # Directory in which to install the documentation info files.
  58. infodir = $(prefix)/info
  59.  
  60. #### End of system configuration section. ####
  61.  
  62. SHELL = /bin/sh
  63.  
  64. SRCS = termcap.c tparam.c version.c
  65. OBJS = termcap.o tparam.o version.o
  66. HDRS = termcap.h
  67. DISTFILES = $(SRCS) $(HDRS) ChangeLog COPYING README INSTALL NEWS \
  68. termcap.texi termcap.info* \
  69. texinfo.tex Makefile.in configure configure.in
  70.  
  71. all:    libtermcap.a termcap.info
  72.  
  73. .c.o:
  74.     $(CC) -c $(CPPFLAGS) $(DEFS) -I$(srcdir) $(CFLAGS) $<
  75.  
  76. install: all
  77.     $(INSTALL_DATA) libtermcap.a $(libdir)/libtermcap.a
  78.     -ranlib $(libdir)/libtermcap.a
  79.     test -d $(includedir) || mkdir $(includedir)
  80.     cd $(srcdir); $(INSTALL_DATA) termcap.h $(includedir)/termcap.h
  81.     -cd $(srcdir); test -z "$(oldincludedir)" || \
  82.       $(INSTALL_DATA) termcap.h $(oldincludedir)/termcap.h
  83.     cd $(srcdir); for f in termcap.info*; \
  84.     do $(INSTALL_DATA) $$f $(infodir)/$$f; done
  85.  
  86. uninstall:
  87.     rm -f $(libdir)/libtermcap.a $(includedir)/termcap.h
  88.     test -z "$(oldincludedir)" || rm -f $(oldincludedir)/termcap.h
  89.     rm -f $(infodir)/termcap.info*
  90.  
  91. libtermcap.a: $(OBJS)
  92.     ar rc $@ $(OBJS)
  93.     -ranlib $@
  94.  
  95. termcap.info: termcap.texi
  96.     $(MAKEINFO) $(srcdir)/termcap.texi --output=$(srcdir)/termcap.info
  97.  
  98. TAGS:    $(SRCS)
  99.     etags $(SRCS)
  100.  
  101. clean:
  102.     rm -f *.a *.o core
  103.  
  104. mostlyclean: clean
  105.  
  106. distclean: clean
  107.     rm -f Makefile config.status
  108.  
  109. realclean: distclean
  110.     rm -f TAGS *.info*
  111.  
  112. dist: $(DISTFILES)
  113.     echo termcap-`sed -e '/version_string/!d' -e 's/[^0-9]*\([0-9a-z.]*\).*/\1/' -e q version.c` > .fname
  114.     rm -rf `cat .fname`
  115.     mkdir `cat .fname`
  116.     ln $(DISTFILES) `cat .fname`
  117.     tar chzf `cat .fname`.tar.z `cat .fname`
  118.     rm -rf `cat .fname` .fname
  119.